package com.zian.domain.dto;

import io.swagger.annotations.ApiModel;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
 @ApiModel( "登录参数")
public class LoginDTO {

     @ApiModelProperty( "用户名")
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{4,16}$", message = "用户名长度4-16位，只能包含字母、数字、下划线、中划线")
    private String username;
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{6,16}$", message = "密码长度6-16位，只能包含字母、数字、下划线、中划线")
     @ApiModelProperty( "密码")
    private String password;

}
